package cn.com.git.workflow.server.api.feign.workflow;

import cn.com.git.common.model.ResultMsg;
import cn.com.git.common.model.ResultPage;
import cn.com.git.workflow.service.dto.*;
import cn.com.git.workflow.service.query.WorkFlowConfigListQuery;
import cn.com.git.workflow.service.query.WorkFlowListQuery;
import feign.Headers;
import feign.Param;
import feign.RequestLine;

/**
 * 流程服务
 * @author zhangzhenfu
 * @Description
 * @date 2020/2/22 15:20
 */
public interface WorkflowFeignService {


    /*
           流程管理
        */
    @RequestLine("POST /work_flow/list/page")
    @Headers({"Content-Type: application/json"})
    ResultPage<WorkFlowListDTO> workFlowListPage(WorkFlowListQuery query);
    @RequestLine("GET /work_flow/find?id={id}")
    ResultMsg<WorkFlowDetailDTO> workFlowFind(@Param("id") Integer id);
    @RequestLine("POST /work_flow/add")
    @Headers({"Content-Type: application/json"})
    ResultMsg<WorkFlowSaveDTO> workFlowAdd(WorkFlowSaveDTO form);
    @RequestLine("POST /work_flow/edit")
    @Headers({"Content-Type: application/json"})
    ResultMsg<WorkFlowSaveDTO> workFlowEdit(WorkFlowSaveDTO form);
    @RequestLine("GET /work_flow/delete?id={id}")
    ResultMsg workFlowDelete(@Param("id") Integer id);


    /*
           流程配置管理
        */
    @RequestLine("POST /work_flow_config/list/page")
    @Headers({"Content-Type: application/json"})
    ResultPage<WorkFlowConfigListDTO> workFlowConfigListPage(WorkFlowConfigListQuery query);
    @RequestLine("GET /work_flow_config/find?id={id}")
    ResultMsg<WorkFlowConfigDetailDTO> workFlowConfigFind(@Param("id") Integer id);
    @RequestLine("POST /work_flow_config/add")
    @Headers({"Content-Type: application/json"})
    ResultMsg<WorkFlowConfigSaveDTO> workFlowConfigAdd(WorkFlowConfigSaveDTO form);
    @RequestLine("POST /work_flow_config/edit")
    @Headers({"Content-Type: application/json"})
    ResultMsg<WorkFlowConfigSaveDTO> workFlowConfigEdit(WorkFlowConfigSaveDTO form);
    @RequestLine("GET /work_flow_config/delete?id={id}")
    ResultMsg workFlowConfigDelete(@Param("id") Integer id);
}
